@common-node-bg: #f4f6fc;
@common-node-bg-hover: #f4f6fcb0;
@common-node-active: #409eff;

.common-circle-node {
  position: absolute !important;
  height: 50px !important;
  width: 50px !important;
  line-height: 50px !important;
  text-align: center !important;
  border: 1px solid #777 !important;
  border-radius: 50% !important;
  background-color: @common-node-bg !important;
  white-space: nowrap !important;
  box-shadow: 2px 2px 5px #ddd !important;

  &:hover {
    background-color: @common-node-bg-hover !important;
    z-index: 2 !important;
  }

  &.active {
    outline: 2px dashed @common-node-active !important;
    outline-offset: 0 !important;
  }

  &.isStart {
    background-color: #65cf38 !important;
    color: #fff !important;
  }

  &.isEnd {
    background-color: #f50 !important;
    color: #fff !important;
  }
}

.common-rectangle-node {
  position: absolute !important;
  line-height: 50px !important;
  text-align: center !important;
  border: 1px solid #777 !important;
  border-radius: 5px !important;
  background-color: @common-node-bg !important;
  white-space: nowrap !important;
  box-shadow: 2px 2px 5px #ddd !important;
  overflow: hidden !important;
  transition: height 0.3s ease !important; /* 平滑过渡高度 */

  &:hover {
    background-color: @common-node-bg-hover !important;
    z-index: 2 !important;
  }

  &.active {
    outline: 2px dashed @common-node-active !important;
    outline-offset: 0 !important;
  }
}

/* 标题样式 */
.node-title {
  font-weight: bold !important;
  font-size: 14px !important;
}

/* 任务列表 */
.node-text-list {
  padding: 0 !important;
  margin: 0 !important;
  list-style: none !important;
}

.node-text-item {
  font-size: 12px !important;
  display: flex !important;
  flex-direction: column !important; /* 让 name 和 time 纵向排列 */
  align-items: center !important;
  height: 36px !important; /* 每行总高 32px */
  padding: 0 !important;
  border-top: 1px solid #ddd !important;
}

/* 任务名称 */
.text-name {
  font-weight: bold !important;
  color: #333 !important;
  line-height: 20px !important; /* 让 name 只占 20px */
}

/* 时间 */
.text-time {
  color: #666 !important;
  line-height: 12px !important; /* time 只占 12px */
}

.common-diamond-node {
  position: absolute !important;
  height: 50px !important;
  width: 50px !important;
  line-height: 50px !important;
  text-align: center !important;
  border: 1px solid #777 !important;
  border-radius: 3px !important;
  background-color: @common-node-bg !important;
  transform: rotate(45deg) !important;
  white-space: nowrap !important;

  &::before {
    position: absolute !important;
    content: '网关' !important;
    transform: rotate(-45deg) !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
  }

  &:hover {
    background-color: @common-node-bg-hover !important;
    z-index: 2 !important;
  }

  &.active {
    outline: 2px dashed @common-node-active !important;
    outline-offset: 0 !important;
  }
}

.common-x_lane-node {
  position: absolute !important;
  text-align: center !important;
  border: 1px solid #777 !important;
  border-radius: 2px !important;
  z-index: -1 !important;
  box-shadow: 2px 2px 5px #ddd !important;

  &.active {
    outline: 2px dashed @common-node-active !important;
    outline-offset: 0 !important;
  }

  .lane-text-div {
    width: 18px !important;
    height: 100% !important;
    position: absolute !important;
    display: table !important;
    border-right: 1px solid #777 !important;
    background-color: @common-node-bg !important;

    &:hover {
      z-index: 2 !important;
    }

    .lane-text {
      word-wrap: break-word !important;
      display: table-cell !important;
      vertical-align: middle !important;
      font-size: 0.8em !important;
    }
  }
}

.common-y_lane-node {
  position: absolute !important;
  text-align: center !important;
  border: 1px solid #777 !important;
  border-radius: 2px !important;
  z-index: -1 !important;
  box-shadow: 2px 2px 5px #ddd !important;

  &.active {
    outline: 2px dashed @common-node-active !important;
    outline-offset: 0 !important;
  }

  .lane-text-div {
    width: 100% !important;
    height: 18px !important;
    position: absolute !important;
    display: table !important;
    border-bottom: 1px solid #777 !important;
    background-color: @common-node-bg !important;

    &:hover {
      z-index: 2 !important;
    }

    .lane-text {
      word-wrap: break-word !important;
      display: table-cell !important;
      font-size: 0.8em !important;
    }
  }
}

.node-icon {
  position: absolute !important;
  top: 3px !important;
  left: 3px !important;
}